import socket
import time
from datetime import datetime, timedelta
from math import ceil

s = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM)

s.bind(('0.0.0.0',123))

while True:
    msg, address = s.recvfrom(48)
    if msg[0] == -29+256:
        
        l = [0 for i in range(48)]
        to_timestamp = ceil(time.time()) + 2208988800

        for x in range(4):
            l[43-x] = to_timestamp % 256
            to_timestamp //= 256 


        s.sendto(bytes(bytearray(l)), address)